package com.zang.schema.observable.observer;

import java.util.Observable;

/**
 * java 原生观察者模式
 * Ditto 百变怪
 * 目标类
 * @author Zhang Qiang
 * @Date 2019/8/29 17:44
 */
public class Ditto extends Observable {

    private String transformation;

    public String getTransformation() {
        return transformation;
    }

    /**
     * 状态改变
     */
    public void setTransformation(String transformation) {
        this.transformation = transformation;
        super.setChanged();
        super.notifyObservers(transformation);
    }

}
